﻿using System;
using System.Collections.Generic;

public partial class ContractsFidejusiunePrintForm_Control : System.Web.UI.UserControl
{
    public string PrintAreaID
    {
        get { return fidejusiune_PrintForm.ClientID; }
    }

    protected void Page_Load(object sender, EventArgs e)
    {       
    }

    public void PrepareViewContract(Credits.DataObjects.Fidejusor contractFutji)
    {
        try
        {
            nrContractLabel.Text = contractFutji.ContractCode + "-" + contractFutji.OrderID;
            contractStartDate.Text = "Din: " + contractFutji.LoanSpecificStartDate;
            fidejusorFirstLastNameLabel.Text = contractFutji.FidejusorFirstLastName;
            fidejusorCountryLabel.Text = contractFutji.FidejusorCountry;
            fidejusorRaionLabel.Text = contractFutji.FidejusorRaion;
            fidejusorLocalitateaLabel.Text = contractFutji.FidejusorLocalitatea;
            fidejusorAdresaLabel.Text = contractFutji.FidejusorAdresa;
            fidejusorPersonalID.Text = contractFutji.FidejusorIDNO;
            fidejusorBirthDateLabel.Text = contractFutji.FidejusorBirthDate.ToString(Constants.Constants.ISODateBackwardDotsFormat);
            loanCodeLabel.Text = contractFutji.ContractCode.ToString();
            loanStratdateLabel.Text = contractFutji.LoanSpecificStartDate;
            clientFirstLastNameLabel.Text = contractFutji.ClientFirstLastName;
            clientPersonalIDLabel.Text = contractFutji.ClientIDNP;
            loanAmountLabel.Text = contractFutji.LoanAmount.ToString();
            loanAmountInWordsLabel.Text = contractFutji.LoanAmountInWords;
            loanEnddateLabel.Text = contractFutji.LoanSpecificEndDate;

            fidejusor_endFirstlastNameLabel.Text = contractFutji.FidejusorFirstLastName;
            fidejusor_endCountryLabel.Text = contractFutji.FidejusorCountry;
            fidejusor_endRaionLabel.Text = contractFutji.FidejusorRaion;
            fidejusor_endLocalitateaLabel.Text = contractFutji.FidejusorLocalitatea;
            fidejusor_endAdresaLabel.Text = contractFutji.FidejusorAdresa;
            fidejusor_endPersonalIDLabel.Text = contractFutji.FidejusorIDNO;
        }
        catch (Exception ex)
        {
            Utils.InfoText(this.Page, "Atentie! Eroare in sistem!", ex.Message);
        }
    } 

}